<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- 
    获取数字中的最小值定义4个数值型变量，
    值分别为26、17、10、20，
    应用if语句获取这4个数字中的最小值。
    -->
    <script>
        let num1 = 26
        let num2 = 17
        let num3 = 10
        let num4 = 20

        let minNum = num1;
        if (num2 < minNum) minNum = num2;
        if (num3 < minNum) minNum = num3;
        if (num4 < minNum) minNum = num4;

        alert(`最小值为${minNum}`);
    </script>
</body>

</html>